﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Labs
{
    class Program
    {
        static void Main(string[] args)
        {
            string r1r2 = Console.ReadLine();
            double r1 = double.Parse(r1r2.Split(' ')[0]);
            double r2 = double.Parse(r1r2.Split(' ')[1]);

            string coords = Console.ReadLine();
            double x = double.Parse(coords.Split(' ')[0]);
            double y = double.Parse(coords.Split(' ')[1]);

            Console.WriteLine(
                (
                    InCircle(x, y, 0, 0, r1) && x <= 0 && y >= 0 ||
                    OutCircle(x, y, 0, 0, r1) && InCircle(x, y, 0, 0, r2) && x >= 0 && y <= 0
                ).ToString()
            );
        }

        static bool InCircle(double x, double y, double xCenter, double yCenter, double r)
        {
            return (Math.Pow(x - xCenter, 2) + Math.Pow(y - yCenter, 2) <= Math.Pow(r, 2));
        }

        static bool OutCircle(double x, double y, double xCenter, double yCenter, double r)
        {
            return (Math.Pow(x - xCenter, 2) + Math.Pow(y - yCenter, 2) >= Math.Pow(r, 2));
        }
    }
}
